import http from '@/utils/http'

export default {
    avatarUpdate: (data: HttpPayload.StudentAvatarUpdate): Promise<string> => http<HttpPayload.StudentAvatarUpdate, string>({ url: '/student/avatarupdate', method: "post", data }),
    getList: (data: HttpPayload.StudentSearch): Promise<{ total: number; list: Array<HttpPayload.StudentAvatar> }> => http<HttpPayload.StudentSearch, { total: number; list: Array<HttpPayload.StudentAvatar> }>({ url: '/student/list', method: "post", data }),
    add:(data: HttpPayload.StudentAvatar): Promise<number> => http({url: '/student/add', method: "post", data}),
    update:(data:HttpPayload.S):Promise<null> => http<HttpPayload.StudentSearch,null>({url:"/student/update",method:"post",data}),
}